package com.cjh.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cjh.common.dto.PermissionDTO;
import com.cjh.common.dto.PermissionDTO1;
import com.cjh.common.entity.Permission;
import com.cjh.common.response.Result;

import java.util.List;
import java.util.Set;

/**
 *
 */
public interface PermissionService extends IService<Permission> {

    Set<String> getAllPermissionByUsername(String username);

    List<PermissionDTO> getMenuTree(Integer id);

    Boolean isSuperAdministrator(String username);

    List<PermissionDTO1> getMenuByUserId(Integer id, Integer permissionId);
    //获取一条菜单
    Permission getMenuById(Integer id);

    List<Integer> getFaththIdListByid(Integer id);
    //增加菜单
    Integer addmenu(Permission permission);

    Integer updateMenu(Permission permission);

    Integer deleteMenuById(Integer id);

    Integer deleteMenuByIdList(List<Integer> id);
}
